import $ from 'jquery'

$('ul li').each(function (i,ele) {
 $(ele).css('color',i%2 === 1 ? 'red' : 'green')
})